Creating launch configuration for remote target system

When debugging an application on a remote target system, a launch configuration is necessary. This launch configuration contains the debugging information that Neuron Power Engineer needs.
(warning) The steps of this section are not required for the built-in PLC because the launch configuration needed by the built-in PLC is already provided in Neuron Power Engineer!

  1. If required, change to one of the perspectives for application creating.

  2. In the project explorer, expand the runtime system folder that you have copied into the project. Expand the sub-folder bin. Select the file RTSLoader in this sub-folder and open its properties (context menu, command Properties).

  3. In the dialog, select the project-relative path (incl. the runtime system folder) and copy this path into the clipboard.

  4. Start the configuration creation for the remote target system: context menu of the project, select Debug As and Debug Configurations...

  5. In the dialog, double-click C/C++ Remote Application in order to create a new launch configuration.

  6. In the tab Main, define the following settings:
     
    Here the details:

    1. Under Name, enter a meaningful name. Ideally this name will not contain umlauts or blanks.

    2. Under C/C++ Application, insert the project-relative path to file RTSLoader that is still in your clipboard.

    3. If required under Build configuration, select the platform for the target system. Alternative: Keep the suggested setting Select Automatically.

    4. Under Connection, enter the connection for the remote target system as it has been created previously by using the perspective Remote System Explorer.

    5. Under Remote Absolute File Path for C/C++ Application, enter the absolute path for the file RTSLoader  as it is true for the target system. You might have to enter a different path than displayed in the above screenshot.

    6. Under Commands to execute before application, enter the command according to this syntax: export LD_LIBRARY_PATH=/path/RTS-folder/lib 
      As value for the exported variable LD_LIBRARY_PATH, you have to enter the absolute path for the runtime system subfolder lib as it is true for the target system. You might have to enter a different path than displayed in the above screenshot.

    7. Make sure that Skip download to target path is unchecked.

  7. In tab Arguments, enter the parameters for starting the runtime system and the absolute path for the runtime system subfolder PLC as it is true for the target system: -v -b/path/RTS-folder/PLC 

  8. In tab Debugger, define the debugger settings:

    Here the details:

    1. Make sure that Stop on startup at is unchecked.

    2. Under GDB debugger, enter the path to the corresponding debugger in your Neuron Power Engineer installation.

      Example:

      Target system

      Path to the GDB debugger within the folder to which Neuron Power Engineer has been installed

      Raspberry Pi

      LC3\plugins\com.logicals.ptk.raspbian.win_x.y.zaaaaaa\bin\SysGCC\bin\arm-linux-gnueabihf-gdb.exe

      x.y.zaaaaaa is a placeholder for the respective version number

  9. In tab Source, add the project:
     
    Here the details:

    1. In the tab, click Add...

    2. In the dialog, select Project - Path Relative to Source Folders and click OK.

  10. In tab Common, select Shared file. Subsequently, you will be able to start the later debugging sessions more quickly.

  11. In dialog Debug Configurations, click Apply at first to have all settings saved in the .launch file. Then click Debug in order to start the debugging session for the application on the remote target system.

    If the message Warning: Unable to find dynamic linker breakpoint function. GDB will be unable to debug shared library initializers and track explicitly loaded dynamic code  is displayed when starting the debugging session, you have to replace a line in the .gdbinit file by the text set sysroot remote:/ (see under "Displaying relevant files within the project explorer").

  12. Terminate the debugging session as described under "Terminating the debugging" before you set the breakpoints as described in the next step.